import logging,yagmail
import time
def send_log():
    str = time.strftime('%Y%m%d-%H%M%S')
    logging.basicConfig(filename=str+'a3mall.log',filemode='w+',format='%(levelname)s-%(asctime)s-%(filename)s-%(message)s',level=logging.DEBUG)

def send_mail(filename):
    email=yagmail.SMTP(user='1441688225@qq.com',password='subvcobnwlujggee',host='smtp.qq.com')
    email.send(to='1441688225@qq.com',subject='a3mall系统Web Ui自动化测试报告',contents='这是一个关于a3mall的业务',attachments=filename)